function fig6_3

clf

% get(gcf)
set(gcf,'Position', [25 1115 658 230])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)
subaxis(1,1,1,1,'MT',0.01,'MB',0.18,'MR',-0.02,'ML',0.05,'P',0.04)

hold on
box on
grid on

b=0.4; a=0.4;

nx=400;
x=linspace(0,1,nx);
ep1=0.1;
ep2=0.01;
g=1;
for ix=1:nx
    u0(ix)=x(ix)*(2+a*x(ix))/(2+a);
    uu1(ix)=U(x(ix),ep1,a,b);
    uu2(ix)=U(x(ix),ep2,a,b);
end

hold on
box on
grid on

plot(x,u0,'--r','Linewidth',1.1)
plot(x,uu1,'b','Linewidth',1.1)
%plot(x,uu2,'--b','Linewidth',1.1)

ax = gca;
ax.XAxis.TickLabelInterpreter = 'latex';
ax.YAxis.TickLabelInterpreter = 'latex';
set(gca,'FontSize',13)

xlabel('$x$\,-\,axis','Interpreter','latex','FontSize',14)
ylabel('Solution','Interpreter','latex','FontSize',14)

legend('\, $u_0(x)$','\, Exact \,','Location','NorthWest','AutoUpdate','off','FontSize',13,'Interpreter','latex')
%plot(x,u0,'r','Linewidth',1.2)
hold off

%exportgraphics(gcf,'/Users/mark/Desktop/fig52.pdf')

function z=U(x,ep,a,b)
zz=a*x^2/2 + x + ((3 - 8*cos(x/ep)^5 + 10*cos(x/ep)^3 - 5*cos(x/ep))*b*ep)/5;
z0=a/2 + 1 + ((3 - 8*cos(1/ep)^5 + 10*cos(1/ep)^3 - 5*cos(1/ep))*b*ep)/5;
z=zz/z0;


















